package cn.haoma.base.utils;

import android.view.View;
import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;

/**
 * Created by ilioili on 2015/6/22.
 */
public class AniUtil {
    public static RotateAnimation rotateView(View v) {
        RotateAnimation animation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
        animation.setRepeatCount(Animation.INFINITE);
        animation.setDuration(2000);
        animation.setInterpolator(new LinearInterpolator());
        v.startAnimation(animation);
        return animation;
    }
}
